package com.xiansiblog.service.Impl;

import com.xiansiblog.dao.UserDao;
import com.xiansiblog.entity.User;
import com.xiansiblog.service.UserService;
import com.xiansiblog.util.MD5Utils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
*@Description: 用户业务层接口实现类
*@Author: 弦思
*@Date 2021/2/2
*/
@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private UserDao userDao;
    @Override
    public User checkUser(String username, String password) {
        User user = userDao.findByUsernameAndPassword(username, MD5Utils.code(password));
        return user;
    }
}
